import { Base } from '../../utils/base.js'
import { My } from '../my/my-model.js';

class Bank extends Base {
  constructor() {
    super();
  }
  //查询银行卡对应的卡名
  selBankName(param, callback) {

    this.request({
      url: 'bankName',
      type: 'post',
      data: param,
      header: {
        'content-type': 'application/x-www-form-urlencoded',

      },
      sCallback: function (data) {
        callback && callback(data);
      },
      eCallback: function (data) {
      }
    })
  }
  //页面加载查询是否有用户的银行卡信息
  selBankValue(callback) {
    this.request({
      url: 'selIndexBank',
      type: 'get',
       
      header: {
        'content-type': 'application/x-www-form-urlencoded',
        'token': wx.getStorageSync('token')
      },
      sCallback: function (data) {
        callback && callback(data);
      },
      eCallback: function (data) {
      }
    })
  }
  //添加银行卡
  addBank(param, callback) {
    this.request({
      url: 'addbank',
      type: 'post',
      data: param,
      header: {
        'content-type': 'application/x-www-form-urlencoded',
        'token': wx.getStorageSync('token')
      },
      sCallback: function (data) {
        callback && callback(data);
      },
      eCallback: function (data) {
      }
    })
  }




}
export { Bank }